Skip to content

Decouple VariantAnalysisManager from VariantAnalysisResultsManager#1657

Merged
elenatanasoiu merged 2 commits intomainfrom
elena/decouple-manager-from-results
Oct 26, 2022
Merged

Decouple VariantAnalysisManager from VariantAnalysisResultsManager#1657
elenatanasoiu merged 2 commits intomainfrom
elena/decouple-manager-from-results

Conversation

@elenatanasoiu
Copy link
Copy Markdown
Contributor

@elenatanasoiu elenatanasoiu commented Oct 26, 2022

At the moment we create the results manager as a private property on the VariantAnalysisManager.

If we instead created it at the extension level and passed it to the VariantAnalysisManager, we would have more freedom to write unit tests for the VariantAnalysisManager without needing to reach into a private results manager property.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@elenatanasoiu elenatanasoiu changed the title WIP Decouple VariantAnalysisManager from VariantAnalysisResultsManager Oct 26, 2022
At the moment we create the results manager as a private property on the `VariantAnalysisManager`.

If we instead created it at the extension level and passed it to the `VariantAnalysisManager`, we would have more freedom to write unit tests for the `VariantAnalysisManager` without needing to reach into a private results manager property.
@elenatanasoiu elenatanasoiu force-pushed the elena/decouple-manager-from-results branch from 9bb6c5f to d49bffe Compare October 26, 2022 12:48
@elenatanasoiu elenatanasoiu marked this pull request as ready for review October 26, 2022 13:21
@elenatanasoiu elenatanasoiu requested review from a team as code owners October 26, 2022 13:21
@elenatanasoiu
Copy link
Copy Markdown
Contributor Author

elenatanasoiu commented Oct 26, 2022

Helps us write some tests around removal of query history items without having to make the variantAnalysisResultsManager property public: 1c6794f#diff-9a58bafccb68e723c78ef4526185ed737f27b29330407b288eb2dbf682256332R41

this.variantAnalysisMonitor.onVariantAnalysisChange(this.onVariantAnalysisUpdated.bind(this));

this.variantAnalysisResultsManager = this.push(new VariantAnalysisResultsManager(cliServer, logger));
this.variantAnalysisResultsManager = this.push(variantAnalysisResultsManager);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to push this since the object is not managed by the variant analysis manager; we are already adding it as a disposable to ctx.subscriptions in the extension.ts file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @koesie10 ! Have changed.

@elenatanasoiu elenatanasoiu merged commit 8521138 into main Oct 26, 2022
@elenatanasoiu elenatanasoiu deleted the elena/decouple-manager-from-results branch October 26, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants